package com.example.dazuoye.model;


import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Document(indexName = "car" ,type = "docs" ,shards = 1,replicas = 0)
public class SearchCar {
    @Id
    private Long c_id;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String title;
    @Field(type = FieldType.Keyword)
    private String carnum;
    @Field(type = FieldType.Keyword)
    private String color;
    @Field(type = FieldType.Keyword)
    private String model;
    @Field(type = FieldType.Integer)
    private int numseat;
    @Field(type = FieldType.Keyword)
    private String brand;
    @Field(type = FieldType.Keyword)
    private String carsite;
    public SearchCar(){}
    public SearchCar(Long c_id,String title,String carnum,String color,String model,int numseat,String brand,String carsite)
    {
        this.brand = brand;
        this.c_id = c_id;
        this.carnum = carnum;
        this.carsite = carsite;
        this.color =color;
        this.model = model;
        this.numseat = numseat;
        this.title = title;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getBrand() {
        return brand;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void setCarnum(String carnum) {
        this.carnum = carnum;
    }

    public String getModel() {
        return model;
    }

    public String getColor() {
        return color;
    }

    public String getCarnum() {
        return carnum;
    }

    public int getNumseat() {
        return numseat;
    }

    public Long getC_id() {
        return c_id;
    }

    public String getCarsite() {
        return carsite;
    }

    public void setC_id(Long c_id) {
        this.c_id = c_id;
    }

    public void setCarsite(String carsite) {
        this.carsite = carsite;
    }

    public void setNumseat(int numseat) {
        this.numseat = numseat;
    }

}
